<?php

namespace backend\models;

use Yii;

/**
 * This is the model class for table "mall_discount".
 *
 * @property int $id
 * @property string $name 键名或作用
 * @property string $value
 * @property int $state 1折扣价 2.3.4
 * @property int $create_time 创建时间
 */
class MallDiscount extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'mall_discount';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['value', 'state'], 'required'],
            [['state', 'create_time'], 'integer'],
            [['name', 'value'], 'string', 'max' => 20],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'name' => 'Name',
            'value' => 'Value',
            'state' => 'State',
            'create_time' => 'Create Time',
        ];
    }
}
